/* XBI */
/* xbixex.h */

/*
 The Xbox game data is architecture in a file system. Within this filesystem, there is a special file which is the
 "default executable". This default executable is the binary code that is executed when the game boots. The
 XBIXboxEXecutable structure represents this executable file.
 */

#ifndef XBI_XEX
#define XBI_XEX 1

#include <xbi/xbicommon.h>

typedef struct _XBIXboxEXecutable XBIXboxEXecutable;

XBIXboxEXecutable * XBIXEXCreateFromBuffer(byte_t * buffer, int size, XBIError * error);
void XBIXEXDelete(XBIXboxEXecutable * xex);

uint32_t XBIXEXGetCRC32(XBIXboxEXecutable * xex);

// Accessors
byte_t * XBIXEXGetMediaID(XBIXboxEXecutable * xex);

void XBIXEXWriteToFile(XBIXboxEXecutable * xex, char * path);

#endif
